home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Pascal Super Library
/
Pascal Super Library (CW International)(1997).bin
/
OVERLAY
/
OVRUMB12
/
OVRTEST.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-09-15
|
1KB
|
47 lines
{$A-,B-,D+,E-,F+,G-,I+,L+,N-,O+,P-,Q-,R+,S+,T+,V-,X-,Y+}
{$M 16384,0,655360}
program OvrTest;
{Test Program for OvrUMB. Shows how to rellocate the overlay
buffer in upper memory}
uses Overlay,OvrUMB,
Ovr1,Ovr2;
{$O Ovr1}{$O Ovr2}
var l:longint;
begin
Writeln('--> Available memory : ',MemAvail);
Writeln('--> Max. Available UMB : ',umb_MaxAvail);
OvrInit('OVRTEST.OVR');
Writeln('Relocation of overlay buffer in UMB');
OvrMovBufToUMB;
{ if umb_MaxAvail>OvrGetBuf then (* equivalent to the previous line*)
OvrSetBufUMB(umb_MaxAvail);}
if OvrResult=ovrNoMemory then
writeln('WARNING: Not enough upper memory to rellocate buffer');
if OvrResult=ovrError then
writeln('WARNING: You have done something wrong. The buffer has not been moved.');
Writeln('--> Available memory : ',MemAvail);
Writeln('--> Max. Available UMB : ',umb_MaxAvail);
Writeln('Allocation of two string[255]');
New(Q1);
Q1^:='This is the value of Q1';
New(Q2);
Q2^:='This is the value of Q2';
Writeln('--> Available memory : ',MemAvail);
Writeln('Execution of Proc1');
Proc1;
Writeln('Execution of Proc2');
Proc2;
Writeln('Execution of Proc1');
Proc1;
Writeln('Execution of Proc2');
Proc2;
Writeln('--> Available memory : ',MemAvail);
Writeln('****** END ***********');
end.